const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  staffPhoto: state => state.user.profile ? state.user.profile.staffPhoto : '',
  name: state => state.user.profile ? state.user.profile.username : ''
  // 也可以使用可选链
  // staffPhoto: state => state.user.profile?.staffPhoto,
  // name: state => state.user.profile?.username
}
export default getters
